# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=python-patchwork
pkgver=1.0.1
pkgrel=7
pkgdesc="Common deployment/sysadmin operations, built on Fabric"
arch=(any)
url="https://github.com/fabric/patchwork"
license=('BSD')
depends=('fabric')
makedepends=('python-setuptools')
source=("https://github.com/fabric/patchwork/archive/$pkgver/$pkgname-$pkgver.tar.gz"
        "invoke-devendor.patch")
sha256sums=('0fda64a68a26a8acab897742773894fb765e1cc0049971675f50d7d5f8ae4fd7'
            '97f70aa48d650a8b52a1562adf09d44d2e734ee431553ad68c23ce2dcc9370f3')

prepare() {
  cd "$srcdir"/patchwork-$pkgver
  patch -p1 -i ../invoke-devendor.patch
}

build() {
  cd "$srcdir"/patchwork-$pkgver
  python setup.py build
}

package() {
  cd "$srcdir"/patchwork-$pkgver
  python setup.py install -O1 --skip-build --root="$pkgdir"
  install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
